import { del, get, post, put } from "@/utils/http";

export default {
  // 一般工具统一封装
  login: params => post("/login/account", params),
  handleDelete: params => post("/admin/deleteCommodity", params),
  uploadFile: params => post("/upload/files", params),
  getJobAll: _ => get("/job/all", _),
  // 设置岗位信息
  jobReleaseJob: _ => post("/job/releaseJob", _),
  jobDeleteJob: id => del("/job/deleteJob/" + id),
  jobList: id => get("/job/list/" + id),
  // 发布内容添加
  addActivityJob: params => post("/job/addActivityJob", params),
  // 活动内容的统一封装
  activityAll: _ => get("/activity/all", _),
  activityUserAll: userId => get("/activity/all", userId),
  activityCommunityAll: communityId =>
    get("/activity/communityActivity", communityId),
  activityCounts: _ => get("/activity/counts", _),
  activityDelete: id => del("/activity/delete", id),
  activityInfo: activeId => get("/activity/getActiveById", { activeId }),
  activityGetOne: activityId => get("/activity/getOne", { activityId }),
  activityVolunteerInfo: id => get("/activity/volunteerInfo/" + id),
  activity_recordList: id => get("/activity/recordList", id),
  activityJoinActivity: params => post("/activity/joinActivity", params),
  activityLeave: params => post("/activity/leave", params),
  activityReleaseactivity: params => post("/activity/releaseactivity", params),
  activityUpdate: params => put("/activity/update", params),
  activityUpdatePost: params => post("/activity/update", params),
  activitySearch: _ => get("/activity/search", _),
  activitySearchTime: _ => get("/activity/searchTime", _),
  activityAllBySearch: params => get("/activity/allBySearch", params),
  activityContentAllBySearch: params => get("/activityContent/allBySearch", params),
  volunteerAllBySearch: params => get("/volunteer/allByserch", params),

  volunteerModify: params => put("/volunteer/modify", params),
  teacherGetAllBySearch: params => get("/teacher/getallBySearch", params),
  courseAllBySearch: params => get("/course/allBySearch", params),
  managerAllGoodsBySearch: params => get("/manager/allGoodsBysearch", params),
  managerGetAllGiftBySearch: params => get("/manager/getAllGiftBysearch", params),
  blacklistListBySearch: params => get("/blacklist/listBySearch", params),
  activitySignIn: activityId => put("/activity/singIn", activityId),
  activitySignOut: activityId => put("/activity/signOut", activityId),
  activityGetToAudit: _ => get("/manager/getToAuditActivity", _),
  activity_allStatus: params => get("/activity/allStatus", params),
  activity_update: params => post("/activity/update", params),
  activity_allStatusQAQ: params => get("/activity/allStatusQAQ", params),
  // 市地区统一封装

  volunteer_familyInfo: _ => get("/volunteer/familyInfo", _),
  volunteer_familyAll: _ => get("/family/all", _),
  family_delete: id => del("/family/delete/" + id),
  // 风采内容的统一封装
  activityContentGetInfo: _ => get("/activityContent/info/" + _),
  commentActivityContent: ({
    id,
    pageNum,
    pageSize,
  }) => get("/comment/activityContent/" + id, {
    pageNum,
    pageSize,
  }),
  activityContentGet: params => get("/activityContent/all", params),
  activityContentDel: params => del("/activityContent/delete/" + params),
  commentDel: params => del("/comment/delete/" + params),
  activityContentListGet: params => get("/activityContent/list", params),
  activityContentPost: params => post("/activityContent/post", params),
  activityContentUpdate: params => put("/activityContent/update", params),
  // 风采留言统一封装
  commentAudit: _ => put("/comment/audit", _),
  commentToAudit: id => get("/comment/toAudit", id),

  manager_getToAuditActivityContent: params =>
    get("/manager/getToAuditActivityContent", params),
  managerAuditActivityLeave: params =>
    put("/manager/auditActivityLeave", params),
  managerGetToAuditCourse: params => get("/manager/getToAuditCourse", params),
  managerGetLeave: params => get("/manager/getLeave", params),
  managerDeleteTeacher: params => del("/manager/deleteTeacher", params),
  batchAuditActivityLeave: params => post("/manager/batchAuditActivityLeave", params),
  batchAuditCourse: params => post("/manager/batchAuditCourse", params),
  // 志愿者统一管理
  volunteerGet: params => get("/manager/getVolunteerCount", params),
  volunteerInfo: params => get("/volunteer/info/" + params),
  // 黑名单
  blacklistGet: _ => get("/blacklist/list", _),
  blacklistPost: params => post("/blacklist/post", params),

  // 社团内容统一封装
  communityAll: _ => get("/community/all", _),
  communityCounts: _ => get("/community/all", _),
  communityDel: id => del("/community/delete", id),
  communityGetJoinedCommunity: _ => get("/community/getJoinedCommunity", _),
  communityGetRuledCommunity: _ => get("/community/getRuledCommunity", _),
  communityInfo: id => get("/community/info/" + id),
  communityGetChildCommunity: id => get("/community/getChildCommunity/" + id),
  community_registry: params => post("/community/registry", params),

  blacklist_delete: id => del("/blacklist/delete/" + id),
  // 课程内容统一封装
  courseDelete: id => del("/course/delete/" + id, id),
  courseAll: params => get("/course/all", params),
  managerGetCourse: params => get("/manager/getCourse", params),
  manager_releasecourse: params => post("/manager/releasecourse", params),
  courseAllStatus: params => get("/course/allStatus", params),
  courseCourseToBeArranged: params => post("/manager/batchArrangeCourse", params),
  courseInfo: id => get("/course/info/" + id),
  // managerArrangeCourse: params => post("/manager/batchArrangeCourse1", params),
  managerAuditCourse: params => put("/manager/auditCourse", params),
  courseGetSignedList: params => get("/course/getSignedList", params),
  courseSignIn: (courseId) => params => put("/course/signIn/" + courseId),//忘记是干啥的了
  courseUpdateCourseScheduleStatus: params => get("/course/updateCourseScheduleStatus", params),
  courseFGetCourseByStatus: params => get("/course/getCourseCanSign", params),
  getSchedulesByIdAndStatus: params => get("/course/getSchedulesByIdAndStatus", params),
  manager_courseSignInCode: params => get("/manager/courseSignInCode", params),
  // 老师管理统一封装
  teacherAll: _ => get("/teacher/all", _),
  teacherModify: params => put("/teacher/modify", params),
  teacherRegister: params => post("/teacher/register", params),
  // 商品内容统一封装
  goodsAll: _ => get("/goods/all", _),
  goodsAllorder: _ => get("/goods/allorder", _),
  goodsAllOrderByStatus: params => get("/goods/allOrderByStatus", params),
  goods_releasegoods: params => post("/goods/releasegoods", params),
  goodsModifyGoods: params => post("/goods/modifyGoods", params),
  //  海报列表统一封装
  posterListGet: _ => get("/poster/list", _),
  posterPost: _ => post("/poster/post", _),
  posterDel: id => del("/poster/delete/" + id),
  //  管理员接口
  resetPass: params => put("/manager/modifypass", params),
  managerModify: params => put("/manager/modify", params),
  manager_getToAuditActivityLeave: _ =>
    get("/manager/getToAuditActivityLeave", _),
  manager_auditActivity: params => put("/manager/auditActivity", params),
  beginActivitySign: params => put("/manager/beginActivitySign", params),
  manager_activitySignInCode: id => get("/manager/activitySignInCode", id),
  manager_activitySignOutCode: id => get("/manager/activitySignOutCode", id),
  managerGetArrangedHours: id => get("/manager/getArrangedHours", id),
  manager_audit_ActivityContent: params =>
    put("/manager/auditActivityContent", params),
  manager_register: params => post("/manager/register", params),
  manager_getManagerList: _ => get("/manager/getManagerList", _),
  //  投票部分内容统一封装
  electionAll: _ => get("/election/all", _),

  electionRelease: params => post("/election/release", params),
  electionGetVoteResultByElectionId: id => get("/election/getVoteResult/" + id),

  goodsUpdateStatus: id => post("/goods/updateStatus", { id }),
  getOrderByOrderType: params => get("/order/getOrderByOrderType", params),
  getPendingRefundApp: params => get("/order/getPendingRefundApp", params),
  courseUpdateCourseSchedule: params => post("/course/updateCourseSchedule", params),

  orderAll: params => get("/order/all", params),
  managerAllgoodsAndGift: params => get("/manager/allgoodsAndGift", params),
  managerAllGoods: params => get("/manager/allGoods", params),
  managerAllGift: params => get("/manager/getAllGift", params),
  orderRefund: params => post("/order/refund", params),
  AllScoreExchange: params => get("/goods/allScoreExchange", params),
  allScoreExchangebyispost: params => get("/goods/allScoreExchangebyispost", params),
  ConfirmGiftPost: params => put("/manager/ConfirmGiftPost", params),
  ConfirmGoodsPost: params => put("/manager/ConfirmGoodsPost", params),
  noPostAllGoodsOrder: params => get("/manager/noPostAllGoodsOrder", params),
  // noPostAllGoodsOrder: params => get("/manager/noPostAllGoodsOrder", params),

  //   测试

};
